package IMIC.NGUYENVANTINH.ARRAY.EXCERCISE.EX08;

public class Models {

	/**
	 * Tinh tong mang hai chieu
	 */
	public int SumArray(int[][] arr) {
		int sum = 0;
		for (int i = 0; i < arr.length; i++) {
			for (int j = 0; j < arr.length; j++) {
				if (i == j) {
					sum += arr[i][j];
				}
			}
		}
		return sum;
	}
}
